package com.example.demo.niuke;

import java.util.Scanner;

/**
 * @Description: 输入一个int型整数
 * 按照从右向左的阅读顺序，返回一个不含重复数字的新的整数
 * 9876673
 * 37689
 * @Author: LLL
 * @Date: 2020-03-17 22:12
 **/
//public class Main5 {
//    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//        String s = br.readLine();
//        ArrayList<Integer> list = new ArrayList<>();
//        for (int i = s.length() - 1; i >= 0; i--) {
//            char c = s.charAt(i);
//            int sss = (int) c - 48;
//            if (!list.contains(sss))
//                list.add(sss);
//        }
//        list.forEach(System.out::print);
//
//    }
//}
public class Main5 {
    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            int len = s.length();
            int[] arr1 = new int[10];
            for (int i = len - 1; i >= 0; i--) {
                if (arr1[s.charAt(i) - 48] == 0) {
                    System.out.print(s.charAt(i) - 48);
                    arr1[s.charAt(i) - 48]++;
                }
            }
        }
    }

}